﻿@model BBSSite.Areas.Admins.ViewModels.AddColumnEntity
@{
    ViewBag.Title = "修改栏目";
    MyPublic.IGettingUrl Urls = ViewBag.Urls as MyPublic.IGettingUrl;
}@section link{
    <link rel="stylesheet" href="@Urls.ContentCssUrl/admins/Public.css" />
}
@using (Html.BeginForm("DoEditColumn", "Column", FormMethod.Post))
{
    @Html.AntiForgeryToken()
    <div class="container toppx1">
        <div class="row">
            <div class="col-md-3">
                @Html.HiddenFor(TB => TB.ID)
            </div>
            <div class="col-md-6">
                <div class="input-group">
                    @{
                        string CheckedA = "";
                        string CheckedB = "";
                        string ShowColumnList = "";
                        if (Model.IsColumnA) { CheckedA = "checked='checked'"; ShowColumnList = "style=display:none"; }
                        else { CheckedB = "checked='checked'"; }
                    }
                    <span class="input-group-addon">栏目级别</span>&nbsp;&nbsp;&nbsp;
                    <input type="radio" value="1" name="ColumnGrade" onclick="onColumnGrade(1)" @CheckedA /> 一级 &nbsp;
                    <input type="radio" value="2" name="ColumnGrade" onclick="onColumnGrade(2)" @CheckedB /> 二级 &nbsp;
                    <select name="ChooseParentColumn" id="ColumnGrade" @ShowColumnList>
                        @{
                            IList<BBSSite.Models.tb_Column> Columns = ViewBag.Columns;
                            foreach (var Column in Columns)
                            {
                                string Selected = "";
                                if (Column.ID == Model.ColumnCodeAID)
                                {
                                    Selected = "selected='selected'";
                                }
                                @:<option value="@Column.ColumnCode" @Selected>@Column.ColumnName</option>
                            }
                        }
                    </select>
                    <span class="input-group-addon mymsg">@Html.ValidationMessageFor(model => model.ColumnName)</span>
                </div>
            </div>
            <div class="col-md-3"></div>
        </div>
        <br />
        <div class="row">
            <div class="col-md-3"></div>
            <div class="col-md-6">
                <div class="input-group">
                    <span class="input-group-addon">栏目名称</span>
                    @Html.TextBoxFor(TB => TB.ColumnName, new { @class = "form-control" })
                    <span class="input-group-addon mymsg">@Html.ValidationMessageFor(model => model.ColumnName)</span>
                </div>
            </div>
            <div class="col-md-3"></div>
        </div>
        <br />
        <div class="row">
            <div class="col-md-3"></div>
            <div class="col-md-6">
                <div class="input-group">
                    <span class="input-group-addon">栏目地址</span>
                    @Html.TextBoxFor(TB => TB.Url, new { @class = "form-control" })
                    <span class="input-group-addon mymsg">@Html.ValidationMessageFor(model => model.Url)</span>
                </div>
            </div>
            <div class="col-md-3"></div>
        </div>
        <br />
        <div class="row">
            <div class="col-md-3"></div>
            <div class="col-md-6">
                <div class="input-group">
                    <span class="input-group-addon">栏目图标</span>
                    @Html.TextBoxFor(TB => TB.LogoClassName, new { @class = "form-control" })
                    <span class="input-group-addon mymsg">@Html.ValidationMessageFor(model => model.LogoClassName)</span>
                </div>
            </div>
            <div class="col-md-3"></div>
        </div>
        <br />
        <div class="row">
            <div class="col-md-12 text-center">
                <input type="submit" name="sublogin" class="OnLogin" value="修改" />
                &nbsp;@Html.ValidationMessage("InfoError", new { style = "color:Red" })
            </div>
        </div>
    </div>
                            }
<script type="text/javascript" src="@Urls.ContentJSUrl/Column.js"></script>